#ifndef GLOBJECT_H
#define GLOBJECT_H

#include <GL/glew.h>
#include "bga/system/ConfigDLL.h"

/**
 * \namespace bga
 * \brief API namespace
 */
namespace bga
{

/*! \class GLObject
*   \brief Base class for GL Objects
*/
class BOARD_HELL_ENGINE GLObject
{
    public:
        GLObject() : id(0) {}

        virtual ~GLObject() {}

        virtual void bind() const = 0; // TODO : eventualy pass in private and make an auto bind/unbind systeme

        virtual void unbind() const = 0;

        GLuint getId() const { return this->id; }

    protected:
        /*!
         * \brief generate id for GL object
         */
        virtual GLuint generate() const = 0;

    protected:
        GLuint id; /// object identifier
};

}

#endif

